<template>
  <div class="app-list">
    <a-list
      :grid="{ gutter: 24, lg: 3, md: 2, sm: 1, xs: 1 }"
      :dataSource="dataSource">
      <a-list-item slot="renderItem" slot-scope="item, index">
        <a-card :hoverable="true">
          <a-card-meta>
            <div style="margin-bottom: 3px" slot="title">{{ item.areaType }}</div>

            <a-avatar class="card-avatar" slot="avatar" >住宿</a-avatar>

            <div class="meta-cardInfo" slot="description">
              <div>
                <p>可订价格：
                  <span>0-{{ item.max }}元</span>
                </p>
              </div>
              <div>
                <p>可订星级：{{ item.hotelStar}}</p>
              </div>
              <div>
                <p>城市明细：{{ item.cityName}}</p>
              </div>
            </div>
          </a-card-meta>

        </a-card>
      </a-list-item>
    </a-list>

  </div>
</template>

<script>

  export default {
    name: "Article",
    components: {},
    data() {
      return {
        dataSource: [],
      }
    },
    mounted () {
      this.getHotels()
    },
    methods: {
      getHotels() {
        this.$http.get('/travel/my/hotel')
          .then(res => {
            this.dataSource = res.result
          })
      }
    }
  }
</script>

<style lang="less" scoped>

  /*.app-list {*/

  /*  .meta-cardInfo {*/
  /*    zoom: 1;*/
  /*    margin-top: 16px;*/

  /*    > div {*/
  /*      position: relative;*/
  /*      text-align: left;*/
  /*      float: left;*/
  /*      width: 50%;*/

  /*      p {*/
  /*        line-height: 32px;*/
  /*        font-size: 24px;*/
  /*        margin: 0;*/

  /*        &:first-child {*/
  /*          color: rgba(0, 0, 0, .45);*/
  /*          font-size: 12px;*/
  /*          line-height: 20px;*/
  /*          margin-bottom: 4px;*/
  /*        }*/
  /*      }*/

  /*    }*/
  /*  }*/
  /*}*/

</style>